<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link href="<%=request.getContextPath()%>/Style/StudentStyle.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/Script/jBox/Skins/Blue/jbox.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/Style/ks.css" rel="stylesheet" type="text/css"/>
<script src="<%=request.getContextPath()%>/Script/jBox/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/Script/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/Script/jBox/i18n/jquery.jBox-zh-CN.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/Script/Common.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/Script/Data.js" type="text/javascript"></script>
<link rel="shortcut icon" href="<%=request.getContextPath()%>/favicon.ico"/>
<script type="text/javascript">
    $().ready(function () {
        setStudMsgHeadTabCheck();
        showUnreadSysMsgCount();
    });

    //我的信息头部选项卡
    function setStudMsgHeadTabCheck() {
        var currentUrl = window.location.href;
        currentUrl = currentUrl.toLowerCase();
        var asmhm = "";
        $("#ulStudMsgHeadTab li").each(function () {
            asmhm = $(this).find('a').attr("href").toLowerCase();
            if (currentUrl.indexOf(asmhm) > 0) {
                $(this).find('a').attr("class", "tab1");
                return;
            }
        });
    }

    //显示未读系统信息
    function showUnreadSysMsgCount() {
        var unreadSysMsgCount = "0";
        if (Number(unreadSysMsgCount) > 0) {
            $("#unreadSysMsgCount").html("(" + unreadSysMsgCount + ")");
        }
    }

    //退出
    function loginOut() {
        if (confirm("确定退出吗？")) {
            StudentLogin.loginOut(function (data) {
                if (data == "true") {
                    window.location = "/Login.aspx";
                }
                else {
                    jBox.alert("退出失败！", "提示", new {buttons: {"确定": true}});
                }
            });
        }
    }

    //更改报考类别
    function changeCateory(thisObj, id) {
        var oldCateoryId = $("#cateoryId").val();
        var cateoryId = "";
        if (id != null) {
            cateoryId = id;
        }
        else {
            cateoryId = thisObj.val();
        }
        var studentId = $("#studentId").val();
        if (cateoryId.length <= 0) {
            jBox.tip("报考类别不能为空！");
            if (id == null) {
                thisObj.val(oldCateoryId);
            }
        }
        else {
            studentInfo.changeStudentCateory(cateoryId, function (data) {
                var result = $.parseJSON(data);
                if ((String(result.ok) == "true")) {
                    window.location.href = "/Index.aspx";
                }
                else {
                    jBox.tip(result.message);
                }
            });
        }
    }
</script>

<script src="<%=request.getContextPath()%>/Script/changeOption.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/Script/rl.js" type="text/javascript"></script>

